package 第一章优化;


public class 重载 {
    public static void main(String[] args) {
        System.out.println(sum(12, 3));
        System.out.println(sum(12, 12, 32));
        System.out.println(sum(12, 21, 2, 12));
    }

    public static int sum(int a, int b) {
        return a + b;
    }

    public static int sum(int a, int b, int c) {
        return a + b + c;
    }

    public static int sum(int a, int b, int c, int d) {
        return a + b + c + d;
    }
}
